package o;

import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.util.Property;
import java.util.WeakHashMap;

public class aqx extends Property<Drawable, Integer> {
    public static final Property<Drawable, Integer> ˏ = new aqx();
    private final WeakHashMap<Drawable, Integer> ॱ = new WeakHashMap();

    public /* synthetic */ Object get(Object obj) {
        return ˊ((Drawable) obj);
    }

    public /* synthetic */ void set(Object obj, Object obj2) {
        ˋ((Drawable) obj, (Integer) obj2);
    }

    private aqx() {
        super(Integer.class, "drawableAlphaCompat");
    }

    public Integer ˊ(Drawable drawable) {
        if (VERSION.SDK_INT >= 19) {
            return Integer.valueOf(drawable.getAlpha());
        }
        if (this.ॱ.containsKey(drawable)) {
            return (Integer) this.ॱ.get(drawable);
        }
        return Integer.valueOf(255);
    }

    public void ˋ(Drawable drawable, Integer num) {
        if (VERSION.SDK_INT < 19) {
            this.ॱ.put(drawable, num);
        }
        drawable.setAlpha(num.intValue());
    }
}
